package edu.gatech.gro.model;

public class ListItem extends Item {

	private int namedListId;
	private boolean checked;
	private int quantity;
	private int currentQuantity;

	public ListItem() {
		super();
	}

	public ListItem(Item i) {
		super();
		setId(i.getId());
		setCreationTime(i.getCreationTime());
		setLastUpdateTime(i.getLastUpdateTime());
		setDeleteFlag(i.isDeleteFlag());
		setItemTypeId(i.getItemTypeId());
		setGroceryStoreId(i.getGroceryStoreId());
		setName(i.getName());
		setNameClean(i.getNameClean());
		setBarCode(i.getBarCode());
		setBarCodeHash(i.getBarCodeHash());
		setPrice(i.getPrice());
		setCurrency(i.getCurrency());
	}

	public int getNamedListId() {
		return namedListId;
	}

	public void setNamedListId(int namedListId) {
		this.namedListId = namedListId;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public int getCurrentQuantity() {
		return currentQuantity;
	}

	public void setCurrentQuantity(int currentQuantity) {
		this.currentQuantity = currentQuantity;
	}

	@Override
	public String toString() {
		StringBuilder b = new StringBuilder();
		b.append(super.toString());
		b.append(quantity).append(" ");
		return b.toString();
	}
}
